import 'package:flutter/material.dart';
import 'package:niu_app/configs/app_style_config.dart';
import 'package:niu_app/pages/dynamic/account/account_page.dart';
import 'package:niu_app/pages/dynamic/dynamics/dynamics_page.dart';
import 'package:niu_app/pages/dynamic/news/news_page.dart';
import 'package:niu_app/pages/dynamic/team/team_page.dart';
import 'package:niu_app/pages/dynamic/transaction/transaction_page.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:niu_app/views/jk/jk_text.dart';

class pubTabbar extends StatefulWidget {
  @override
  _pubTabbarState createState() => _pubTabbarState();
}

class _pubTabbarState extends State<pubTabbar> {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 600+44+30.0.h,
      child: DefaultTabController(
        length: 5,

        child: Column(
          children: [
            Container(
              height: 44.h,
              width: 375.w,
              child: TabBar(
                labelColor: Colors.black,
                unselectedLabelColor: Colors.grey,
                indicatorColor: Color(0000000000),
                labelStyle: TextStyle(fontWeight: FontWeight.bold),
                tabs: [
                  Tab(text: "账户",),
                  Tab(text: "交易",),
                  Tab(text: "动态",),
                  Tab(text: "团队",),
                  Stack(
                    children: [
                      Container(
                        width:40,
                        child: Tab(text: "消息",),
                      ),
                      Positioned(
                          left: 27.w,
                          child: Container(
                            height: 14.w,
                            width: 14.w,
                            decoration: BoxDecoration(
                              borderRadius: BorderRadius.all(
                                Radius.circular(75)
                              ),
                              color: AppStyleConfig.color8
                            ),
                            child: Center(
                              child: JKText(data: "2",color: AppStyleConfig.TextColor,fontSize: 10.w,),
                            ),
                          )
                      )
                    ],
                  )
                ],
              ),
            ),
            Expanded(
              flex: 1,
                child: TabBarView(
                  children: [
                    account_Page(),
                    transaction_Page(),
                    dynamics_Page(),
                    team_Page(),
                    news_Page()
                  ],
                )
            )
          ],
        ),

      ),
    );
  }
}
